import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'default-passive-events'
import tim from '@/tim.js'
import TIM from 'tim-js-sdk'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import * as request from './api/request'
import '@/assets/css/components.css'
import 'mint-ui/lib/style.css'
import { getTime,getDay } from '@/utils/service'
import { Swipe, SwipeItem } from 'vant';

Vue.use(Swipe);
Vue.use(SwipeItem);

window.tim = tim
window.TIM = TIM
window.store = store

Vue.use(ElementUI)
Vue.prototype.axios = request
Vue.prototype.$bus = new Vue()
Vue.prototype.tim = tim
Vue.prototype.TIM = TIM
Vue.prototype.$store = store
Vue.config.productionTip = false

Vue.filter('dateformat', (time) => {
  return time?getTime(time):'--'
})
Vue.filter('dateforday', (time) => {
  return time?getDay(time):'--'
})

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
